//    Copyright (C) Kherty.  All rights reserved.
using System.Collections.Generic;

namespace OpenLS.Spreadsheet
{
    class SimpleTextParser
    {
        public static IEnumerable<IEnumerable<string>> Parse(string s)
        {
            foreach (string line in s.Split('\n'))
            {
                yield return ParseSingleLine(line.Replace("\r", ""));
            }
        }

        private static IEnumerable<string> ParseSingleLine(string line)
        {
            foreach (string s in line.Split('\t'))
                yield return s;
        }
    }
}
